<?php
/**
 * The loop that displays a single post.
 *
 * The loop displays the posts and the post content.  See
 * http://codex.wordpress.org/The_Loop to understand it and
 * http://codex.wordpress.org/Template_Tags to understand
 * the tags used in it.
 *
 * This can be overridden in child themes with loop-single.php.
 *
 * @package WordPress
 * @subpackage Twenty_Ten
 * @since Twenty Ten 1.2
 */
?>

<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
				<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
                <div id="single-case-content">
                <?php
                        $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) );
                        if ( $images ) {
                        $total_images = count( $images );
                        $image = array_shift( $images );
                        $image_img_tag = wp_get_attachment_image( $image->ID, 'full',1,array('title'=>$post->post_title));
                        /*获取图片url*/
                        /*
                        $img_array = wp_get_attachment_image_src( $image->ID, 'full',1);
                        $img_url = $img_array [0];
                        */
                        /*end 获取图片url*/
                        echo $image_img_tag;
                        }; ?>
                <!--div id="project-single-bottom">
                    <h3><?php the_title(); ?></h3>
                    <span><?php the_excerpt();?></span>
                </div-->
                    <!--div id="nav-below" class="navigation">
                        <div class="nav-previous"><?php
                                previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;',
                            'Previous post link', 'twentyten' ) . '</span> %title' ); ?></div>
                        <div class="nav-next"><?php
                                next_post_link( '%link', '%title <span class="meta-nav">' . _x(
                                '&rarr;', 'Next post link', 'twentyten' ) . '</span>' ); ?></div>
                    </div-->
                </div>
<?php endwhile; // end of the loop. ?>